﻿using System;
using EclipseLib.Shared;

namespace EclipseLib.Server
{
    public class Character
    {
        // Data Members
        string name;
        short[] Vitals;
        short[] Stats;
        Direction dir;
        int map;
        byte x, y;

        // Member Properties
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public Direction Dir
        {
            get { return dir; }
            set { dir = value; }
        }
        public int Map
        {
            get { return map; }
            set { map = value; }
        }
        public byte X
        {
            get { return x; }
            set { x = value; }
        }
        public byte Y
        {
            get { return y; }
            set { y = value; }
        }

        // Constructors
        public Character()
        {
            Name = "";
            Vitals = new short[(int)Vital.Total];
            Stats = new short[(int)Stat.Total];
            Dir = Direction.South;
            Map = 0;
            X = Y = 0;
        }

        // Public Methods
        public short GetVital(Vital V)
        {
            return Vitals[(int)V];
        }
        public short GetStat(Stat S)
        {
            return Stats[(int)S];
        }
        public void SetVital(Vital V, short Value)
        {
            Vitals[(int)V] = Value;
        }
        public void SetStat(Stat S, short Value)
        {
            Stats[(int)S] = Value;
        }
    }
}
